<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>hanRsa</title>
    <script src="./jsencrypt.min.js"></script>
</head>
<body>
<!--RSA加密解密-->
<script type="text/javascript">
    var encrypt = new JSEncrypt(1024);
    encrypt.setPublicKey("MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCK7JHRdlYQ8oo8zPqudTApYmyPuL1Yd8q2IED5aK5/sr/a0v7ktDLjy76zBaFoZyyM/3IawwwvEnB5nY2dnTTcCvbchS+sFDbhzXxx2J7jG86nhLlMuW3kBrqB99Bs7qw/D0lRfoMqESSUJ3Oa4cBohENGmaDFiVIhqW+9qPwYnwIDAQAB");
    var encrypted = encrypt.encrypt("5我adflkja");
    // Uxn0M159Zvwt20fLgyA8t6zNErfCwLUtmfwSbH4LAm2+LXsny7qsoP2/3nMlx3oGWRr213o1aaAEuc7asp2WjrwDeSQMHwQRq2PXQUMnfUMZZeQQXnPwIaQpBV5VHZQ2VNt0LJxBYyG4mRrBS4ZYdpJAMYlxSbuev3IQlOvYP/g=
    console.log("##############1###########加密########")
    console.log(encrypted)
    console.log("##############2####解密###############")
    var xx=new JSEncrypt(1024)
    xx.setPrivateKey("MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAIrskdF2VhDyijzM+q51MClibI+4vVh3yrYgQPlorn+yv9rS/uS0MuPLvrMFoWhnLIz/chrDDC8ScHmdjZ2dNNwK9tyFL6wUNuHNfHHYnuMbzqeEuUy5beQGuoH30GzurD8PSVF+gyoRJJQnc5rhwGiEQ0aZoMWJUiGpb72o/BifAgMBAAECgYAm4dBsHiE3jBKJstskkdMBejUlQpDoHlsDf2KAC77vKbHNxoklrJOjswY0J8rFpD7RVbtzZwzVbeVB/IlCyFmfIeLSv8XSv9E+hzxg9ORDiwKE4ifDSIG2dyqvzRqN/wl7+QZp4xsV4FKcb15pYmiJL0c/QXzIiFEkAo6FriYjWQJBAO//2F3sdKB1WfipdCBi65qVnWmAtEbX9k06eI93el4qGLProL9ffqOXYKHEe66zBUHvXgTi6mpVz3G+QBfW0+kCQQCUL6Lxo9vzSsEt9a18bUiYmzgViB1KUFO/3LzA6x08Vghe8ovfdNPucs49MDepNeG1gYvbUBuEAiviAYdTx9tHAkEA4Ow57uxn8OmKRI0rFB8hB2Mof3PrgGltn7souewTdqSlOhmeMTxiBxcbrP/jmjqUttKKnrG7V6TMIaFXl//x4QJANw/8XA2nDSAZ6BoB/Noev5XtoRKSz6pJdGFxQb4bfu/47E7z6nRey5udRt9Dz3xWAjvA3B1IHCUyaShoQJliwQJAC99E9NLqIX2R+WxpjbDasVVnNZuEgHO20Kv/UG/7I3y4As2kd8iLyXwhUzuhOETUmwDtvHvtmrXH/jLOykglsw==")
   var dec= xx.decrypt(encrypted)
    console.log(dec)
</script>
</body>
</html>